package com.zyx.camunda.factory;

import org.camunda.bpm.engine.variable.VariableMap;
import org.camunda.bpm.engine.variable.Variables;

import java.util.stream.Collectors;
import java.util.stream.Stream;

/**
 * @author Yaxi.Zhang
 * @since 2022/9/7 00:39
 */
public class GenObject {

    public static VariableMap genParamMap() {
        return Variables.createVariables()
            .putValue("role", 4)
            .putValue("assigneeList1", Stream.of("100", "101", "102").collect(Collectors.toList()))
            .putValue("assigneeList2", Stream.of("200", "201", "202").collect(Collectors.toList()))
            .putValue("assigneeList3", Stream.of("300", "301", "302").collect(Collectors.toList()))
            .putValue("assigneeList4", Stream.of("400", "401", "402").collect(Collectors.toList()));
    }

    public static VariableMap genFormParam() {
        return Variables.createVariables()
            .putValue("days", 2)
            .putValue("reason", "身体不适")
            .putValue("assigneeList1", Stream.of("100", "101", "102").collect(Collectors.toList()))
            .putValue("assigneeList2", Stream.of("200", "201", "202").collect(Collectors.toList()));
    }

}
